﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace UAC.Operation
{
    public class TeamDef
    {
        /// <summary>
        /// DB Primary Key
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// Custom ID
        /// </summary>
        public int TeamDefID { get; set; }
        public string TargetDescription { get; set; }
        public string Description { get; set; }
        public int IsSystem { get; set; }

        public TeamDef() { }

        public TeamDef(DataRow dr)
        {
            this.ID = Convert.ToInt32(dr["id"]);
            this.TeamDefID = Convert.ToInt32(dr["teamdefid"]);
            this.Description = dr["description"].ToString();
            this.TargetDescription = dr["targetdescription"].ToString();
            this.IsSystem = Convert.ToInt32(dr["issystem"]);
        }

        public override string ToString()
        {
            return string.Format("{0}-{1}", this.TeamDefID, this.Description);
        }
    }
}
